package com.jwb;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 *  外置tomcat, 必须继承 SpringBootServletInitializer
 *  外置tomcat需适配当前tomcat内嵌版本
 */
@SpringBootApplication
@MapperScan("com.jwb.mapper.dao")
@EnableScheduling
public class JwbApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(JwbApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(JwbApplication.class);
    }
}
